<?PHP
include('mysqlHelper.php');
$id = $_GET['id'];

$result = obtenerPersonasCercanas($id);

$personas = array();

if(mysql_num_rows($result)) {
  while($persona = mysql_fetch_assoc($result)) {
	$tmp = base64_decode($persona["foto"]);
	$persona[0] = $tmp;
    $personas[] = $persona;
  }

}

header('Content-type: application/json');
echo json_encode(array('personas'=>$personas));

?>
